<div class="row toolbar">
  <div class="col-md-6">
    <span class="toolbar-header">
      <%= @patient.new_record? ? "#{t(:new_patient)}" : "#{t(:edit)} #{t(:patient)}" %> 
    </span>
  </div>
  <div class="col-md-6 text-right">
    <ul class="toolbar-nav">
      <li><%= link_to simple_icon("user"), @patient %></li>
      <li><%= link_to simple_icon("users"), patients_path %></li>
    </ul>
  </div>
</div>

<%= form_for(@patient) do |f| %>
  <% if @patient.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@patient.errors.count, "error") %> prohibited this patient from being saved:</h2>

      <ul>
      <% @patient.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="form-group">
    <div class="row">
      <div class="col-md-4">
        <%= f.label :first_name %>
        <%= f.text_field :first_name, class: "form-control" %>
      </div>
      <div class="col-md-4">
        <%= f.label :last_name %>
        <%= f.text_field :last_name, class: "form-control" %>
      </div>
    </div>
  </div>

  <div class="form-group">
    <%= f.label :dob %>
    <%= f.date_select :dob, class: "form-control" %>
  </div>
  <div class="form-group">
    <%= f.label :mobile %>
    <div class="row">
      <div class="col-md-4">
        <%= f.text_field :mobile, class: "form-control" %>
      </div>
    </div>
  </div>
  <div class="form-group">
    <%= f.label :email %>
    <div class="row">
      <div class="col-md-4">
        <%= f.text_field :email, class: "form-control" %>
      </div>
    </div>
  </div>
  <%= f.submit class: "btn btn-primary" %>
<% end %>
